using System.Collections;
using System.Collections.Generic;
using PureMVC.Interfaces;
using PureMVC.Patterns.Command;
using UnityEngine;

public class HpCommand : SimpleCommand
{
    public override void Execute(INotification notification)
    {
        base.Execute(notification);
        switch (notification.Name)
        {
            case Notifications.RandomBtnClick:
                HpProxy hpProxy = ApplicationFacade.Instance.RetrieveProxy("HpProxy") as HpProxy;
                hpProxy.RandomHp();
                float hp = hpProxy.Hp;
                ApplicationFacade.Instance.SendNotification(Notifications.HpChanged, hp);
                break;
            case Notifications.ResetBtnClick:
                HpProxy hpProxy2 = ApplicationFacade.Instance.RetrieveProxy("HpProxy") as HpProxy;
                hpProxy2.ResetHp();
                float hp2 = hpProxy2.Hp;
                ApplicationFacade.Instance.SendNotification(Notifications.HpChanged, hp2);
                break;
        }
    }
}
